ParcelTrack API
Receiving Webhook Notifications
The notification_endpoint URL supplied in your subscription needs to be built to accept the type of request/messages that are generated by NZ Post, this will also require the normal "200" response message to be returned.
Response Elements
Field Name | Description | Required | Type | Example |
---|---|---|---|---|
message_datetime | Timestamp of this message | Yes | String | 2017-10-17T11:35:21.3135634+13:00 |
message_id | Identifier of this message | Yes | String | 4b1664a2-6f8d-4587-a6bb-f5aa5639263a |
notification_id | Identifier of this notification | Yes | String | 280d2aec-d5a3-4ceb-9f61-8c861dfb516a |
subscription_guid | Identifier of the subscription this notification relates to | Yes | String | 28F2A43B-9019-462D-A3BF-6371239ACD53 |
tracking_reference | The tracking reference this notification relates to | Yes | String | CL092594237NZ |
tracking_events | List of tracking events | Yes | Array | See Tracking Events Response Elements |
Tracking Events Response Elements
Field Name | Description | Required | Type | Example |
---|---|---|---|---|
event_datetime | Timestamp of the event | Yes | String | 2017-05-22T12:39:37 |
event_description | Description of the event | No | String | Your item was picked up by our courier Sanjay based at AKL Western Suburbs Fleet |
event_edifact_code | Unique code for the event | No | String | 13 |
signed_by | List of details about the signee | No | Object | See Signed By Response Elements |
source | The source system for this event | No | String | CME |
status_description | Description of the event status | No | String | With courier for delivery |
tracking_reference | The tracking reference this event relates to | No | String | CL092594237NZ |
Signed By Response Elements
Field Name | Description | Required | Type | Example |
---|---|---|---|---|
name | Full name of the person providing the signature | No | String | John |
signature | Base64 encoded signature | No | String | ec608f40-2a8b-11e5... |
Response Examples
Acceptance:
{
"message_datetime":"2017-10-17T11:35:02.8690189+13:00",
"message_id":"8526758a-dddd-426c-9f33-70c1ee006303",
"notification_id":"8c4811f9-a5f0-4233-bec2-a985c69ff3a2",
"subscription_guid":"28F2A43B-9019-462D-A3BF-6371239ACD53",
"tracking_events":[
{
"event_datetime":"2017-10-16T22:34:39.8430000Z",
"event_description":"Acceptance",
"event_edifact_code":"13",
"signed_by":{
"name":"",
"signature":""
},
"source":"CME",
"status_description":"Acceptance",
"tracking_reference":"8963062936272601WLG004AS"
}
],
"tracking_reference":"8963062936272601WLG004AS"
}
Out for delivery:
{
"message_datetime":"2017-10-17T11:35:21.3135634+13:00",
"message_id":"4b1664a2-6f8d-4587-a6bb-f5aa5639263a",
"notification_id":"280d2aec-d5a3-4ceb-9f61-8c861dfb516a",
"subscription_guid":"28F2A43B-9019-462D-A3BF-6371239ACD53",
"tracking_events":[
{
"event_datetime":"2017-10-16T22:34:56.1330000Z",
"event_description":"Out for Delivery",
"event_edifact_code":"32",
"signed_by":{
"name":"",
"signature":""
},
"source":"CME",
"status_description":"Out for Delivery",
"tracking_reference":"8963062936272601WLG004AS"
}
],
"tracking_reference":"8963062936272601WLG004AS"
}
Delivery:
{
"message_datetime": "2017-10-17T11:39:46.7661705+13:00",
"message_id": "6cd89513-5edf-4c9f-9619-08a587f69e34",
"notification_id": "3b8aee42-ab9f-4619-ab9b-977e981034ca",
"subscription_guid": "28F2A43B-9019-462D-A3BF-6371239ACD53",
"tracking_events": [
{
"event_datetime": "2017-10-16T22:35:14.6400000Z",
"event_description": "Delivery",
"event_edifact_code": "22",
"signed_by": {
"name": "John Smith",
"signature": ""
},
"source": "CME",
"status_description": "Delivery",
"tracking_reference": "8963062936272601WLG004AS"
}
],
"tracking_reference": "8963062936272601WLG004AS"
}